{load header}
<!--/H-->

    <!-- 内容区 -->
    <div id="main-content">
        <div id="top-alert" class="fixed alert alert-error" style="display: none;">
            <button class="close fixed" style="margin-top: 4px;">&times;</button>
            <div class="alert-content">这是内容</div>
        </div>
        <div id="main" class="main">
        <!-- nav --><!-- nav -->
            
	<div class="main-title cf">
		<h2>添加众筹项目信息</h2>
	</div>
	<div class="tab-wrap">
		<ul class="tab-nav nav">
			<li data-tab="tab1" class="current"><a href="javascript:void(0);">众筹信息</a></li>
			<li data-tab="tab2" ><a href="javascript:void(0);">平台logo</a></li>
			<li data-tab="tab3" ><a href="javascript:void(0);">详情介绍</a></li>
                        <li data-tab="tab4" ><a href="javascript:void(0);">众筹简介</a></li>
			<li data-tab="tab5" ><a href="javascript:void(0);">基本信息</a></li>
		</ul>
		<div class="tab-content">
	<form action="" method="post" class="form-horizontal">
			<div id="tab1" class="tab-pane in tab1">
                            
				<div class="form-item cf">
					<label class="item-label">众筹项目名称<span class="check-tips">（用于前台显示）</span></label>
					<div class="controls name_name">
                                            <input type="text" class="text input-large" name="title" value="{$item['title']}">
					</div>
				</div>
				<div class="form-item cf">
					<label class="item-label">推广链接<span class="check-tips"></span></label>
					<div class="controls">
                                            <input type="text" class="text input-large" name="promlink" value="{$item['promlink']}">
					</div>
				</div>
                                <div class="form-item cf">
					<label class="item-label">所属行业<span class="check-tips">（PC互联网、移动互联网）</span></label>
					<div class="controls">
                                            <input type="text" class="text input-small" name="pro_industry" value="{$item['pro_industry']}">
					</div>
				</div>
                                <div class="form-item cf">
                                            <label class="item-label">开发阶段<span class="check-tips">（产品研发中等）</span></label>
                                            <div class="controls">
                                                <input type="text" class="text input-small" name="develop_stage" value="{$item['develop_stage']}">
                                            </div>
				</div>
                                <div class="form-item cf">
                                            <label class="item-label">团队人数<span class="check-tips"></span></label>
                                            <div class="controls">
                                                <input type="text" class="text input-small" name="team_nums" value="{$item['team_nums']}">
                                            </div>
				</div>
                            
                           
                                <div class="form-item cf">
					<label class="item-label">组织者名称<span class="check-tips"></span></label>
					<div class="controls">
						<input type="text"  class="text input-small" name="organizer" value="{$item['organizer']}">
					</div>
				</div>
                            <div class="form-item">
                                <label class="item-label">是否显示</label>
                                <div class="controls">
                                    <label class="radio"><input  type="radio" name="is_show" {if $item['is_show'] == 0} checked{/if}value="0" />隐藏</label>
                                    <label class="radio"><input  type="radio" name="is_show" {if $item['is_show'] == 1} checked{/if} value="1" />显示</label>
                                </div>
                            </div>
                            <div class="form-item">
                                <label class="item-label">排序</label>
                                <div class="controls">
                                    <input type="text"  class="text input-small" name="sort" value="{$item['sort']}">
                                </div>
                            </div>
                        </div>
		<div id="tab2" class="tab-pane tab2">
				<div class="form-item">
					<label class="item-label">列表banner图片<span class="check-tips">（在首页或列表页显示）</span></label>
					<div class="controls">
						<input type="file" id="upload_picture_cover_id">
                                                <input type="hidden" name="banner_list" id="cover_id_cover_id" value="{$item['banner_list']}"/>
						<div class="upload-img-box"><!--{if ($item['banner_list']!='')}--><div class="upload-pre-item"><img src="{$item['banner_list']}"/></div><!--{/if}--></div>
					</div>
					<script type="text/javascript" src="{eval echo base_url()}static/uploadify/jquery.uploadify.min.js"></script>
					<script type="text/javascript">
					//上传图片
					/* 初始化上传插件 */
					$("#upload_picture_cover_id").uploadify({
						"height"          : 30,
						"swf"             : "{eval echo base_url()}static/uploadify/uploadify.swf",
						"fileObjName"     : "picture",
						"buttonText"      : "上传图片",
						"uploader"        : "http://static.tan66.com/upload/picture.html",//
						//'formData' : {"action": "upload", "sid" : ""},
						"width"           : 120,
						'removeTimeout'	  : 1,
						'fileTypeExts'	  : '*.jpg; *.png; *.gif;',
						"onUploadSuccess" : uploadPicturecover_id,
						'onFallback' : function() {
							alert('未检测到兼容版本的Flash.');
						}
					});
					function uploadPicturecover_id(file, data){
						var data = $.parseJSON(data);
						var src = '';
						if(data.status){
							$("#cover_id_cover_id").val(data.id);
							src = data.url || '' + data.path
							$("#cover_id_cover_id").parent().find('.upload-img-box').html(
								'<div class="upload-pre-item"><img src="' + src + '"/></div>'
							);
							
						} else {
							updateAlert(data.info);
							setTimeout(function(){
								$('#top-alert').find('button').click();
								//$(that).removeClass('disabled').prop('disabled',false);
							},1500);
						}
					}
					</script>
				</div>
                    
                                <div class="form-item">
					<label class="item-label">详情banner页图片<span class="check-tips">（详情页显示）</span></label>
					<div class="controls">
						<input type="file" id="upload_picture_cover_id_02">
                                                <input type="hidden" name="banner_detail" id="cover_id_cover_id_02" value="{$item['banner_detail']}"/>
						<div class="upload-img-box"><!--{if ($item['banner_detail']!='')}--><div class="upload-pre-item"><img src="{$item['banner_detail']}"/></div><!--{/if}--></div>
					</div>
					
					<script type="text/javascript">
					//上传图片
					/* 初始化上传插件 */
					$("#upload_picture_cover_id_02").uploadify({
						"height"          : 30,
						"swf"             : "{eval echo base_url()}static/uploadify/uploadify.swf",
						"fileObjName"     : "picture",
						"buttonText"      : "上传图片",
						"uploader"        : "http://static.tan66.com/upload/picture.html",//
						//'formData' : {"action": "upload", "sid" : ""},
						"width"           : 120,
						'removeTimeout'	  : 1,
						'fileTypeExts'	  : '*.jpg; *.png; *.gif;',
						"onUploadSuccess" : uploadPicturecover_id_02,
						'onFallback' : function() {
							alert('未检测到兼容版本的Flash.');
						}
					});
					function uploadPicturecover_id_02(file, data){
						var data = $.parseJSON(data);
						var src = '';
						if(data.status){
							$("#cover_id_cover_id_02").val(data.id);
							src = data.url || '' + data.path
							$("#cover_id_cover_id_02").parent().find('.upload-img-box').html(
								'<div class="upload-pre-item"><img src="' + src + '"/></div>'
							);
							
						} else {
							updateAlert(data.info);
							setTimeout(function(){
								$('#top-alert').find('button').click();
								//$(that).removeClass('disabled').prop('disabled',false);
							},1500);
						}
					}
					</script>
				</div>
                                <div class="form-item">
					<label class="item-label">移动端首页图片<span class="check-tips">（详情页显示）</span></label>
					<div class="controls">
						<input type="file" id="upload_picture_cover_id_04">
						<input type="hidden" name="app_banner_link" id="cover_id_cover_id_04"/>
						<div class="upload-img-box"><!--{if ($item['app_banner_link']!='')}--><div class="upload-pre-item"><img src="{$item['app_banner_link']}"/></div><!--{/if}--></div>
					</div>
					
					<script type="text/javascript">
					//上传图片
					/* 初始化上传插件 */
					$("#upload_picture_cover_id_04").uploadify({
						"height"          : 30,
						"swf"             : "{eval echo base_url()}static/uploadify/uploadify.swf",
						"fileObjName"     : "picture",
						"buttonText"      : "上传图片",
						"uploader"        : "http://static.tan66.com/upload/picture.html",//
						//'formData' : {"action": "upload", "sid" : ""},
						"width"           : 120,
						'removeTimeout'	  : 1,
						'fileTypeExts'	  : '*.jpg; *.png; *.gif;',
						"onUploadSuccess" : uploadPicturecover_id_04,
						'onFallback' : function() {
							alert('未检测到兼容版本的Flash.');
						}
					});
					function uploadPicturecover_id_04(file, data){
						var data = $.parseJSON(data);
						var src = '';
						if(data.status){
							$("#cover_id_cover_id_04").val(data.id);
							src = data.url || '' + data.path
							$("#cover_id_cover_id_02").parent().find('.upload-img-box').html(
								'<div class="upload-pre-item"><img src="' + src + '"/></div>'
							);
							
						} else {
							updateAlert(data.info);
							setTimeout(function(){
								$('#top-alert').find('button').click();
								//$(that).removeClass('disabled').prop('disabled',false);
							},1500);
						}
					}
					</script>
				</div>
                                <div class="form-item">
					<label class="item-label">组织者头像图片<span class="check-tips">（详情页显示）</span></label>
					<div class="controls">
						<input type="file" id="upload_picture_cover_id_03">
                                                <input type="hidden" name="organizer_head" id="cover_id_cover_id_03" value="{$item['organizer_head']}"/>
						<div class="upload-img-box"><!--{if ($item['organizer_head']!='')}--><div class="upload-pre-item"><img src="{$item['organizer_head']}"/></div><!--{/if}--></div>
					</div>
					
					<script type="text/javascript">
					//上传图片
					/* 初始化上传插件 */
					$("#upload_picture_cover_id_03").uploadify({
						"height"          : 30,
						"swf"             : "{eval echo base_url()}static/uploadify/uploadify.swf",
						"fileObjName"     : "picture",
						"buttonText"      : "上传图片",
						"uploader"        : "http://static.tan66.com/upload/picture.html",//
						//'formData' : {"action": "upload", "sid" : ""},
						"width"           : 120,
						'removeTimeout'	  : 1,
						'fileTypeExts'	  : '*.jpg; *.png; *.gif;',
						"onUploadSuccess" : uploadPicturecover_id_02,
						'onFallback' : function() {
							alert('未检测到兼容版本的Flash.');
						}
					});
					function uploadPicturecover_id_02(file, data){
						var data = $.parseJSON(data);
						var src = '';
						if(data.status){
							$("#cover_id_cover_id_03").val(data.id);
							src = data.url || '' + data.path
							$("#cover_id_cover_id_03").parent().find('.upload-img-box').html(
								'<div class="upload-pre-item"><img src="' + src + '"/></div>'
							);
							
						} else {
							updateAlert(data.info);
							setTimeout(function(){
								$('#top-alert').find('button').click();
								//$(that).removeClass('disabled').prop('disabled',false);
							},1500);
						}
					}
					</script>
				</div>
		</div>
		
		
		<div id="tab3" class="tab-pane tab3">
				
                            <div class="form-item">
				<label class="item-label">众筹简介<span class="check-tips"></span></label>
				<div class="controls">
					<label class="textarea">
						<textarea name="description">{$item['description']}</textarea>
						<link rel="stylesheet" href="{eval echo base_url()}static/kindeditor/default/default.css" />
						<script charset="utf-8" src="{eval echo base_url()}static/kindeditor/kindeditor-min.js"></script>
						<script charset="utf-8" src="{eval echo base_url()}static/kindeditor/zh_CN.js"></script>
						<script type="text/javascript">
							var editor1;
							KindEditor.ready(function(K) {
								editor1 = K.create('textarea[name="description"]', {
									allowFileManager : false,
									themesPath: K.basePath,
									width: '100%',
									height: '350px',
									resizeType: 1,
									pasteType : 2,
									urlType : 'absolute',
								});
							});

							$(function(){
								//传统表单提交同步
								$('textarea[name="description"]').closest('form').submit(function(){
									editor1.sync();
								});
								//ajax提交之前同步
								$('button[type="submit"],#submit,.ajax-post').click(function(){
									editor1.sync();
								});
							})
						</script>
					</label>
				</div>
			</div>
		
		</div>
            <div id="tab4" class="tab-pane tab4">
				
                            <div class="form-item cf">
                                    <label class="item-label">众筹简介<span class="check-tips">（平台简介）</span></label>
                                    <div class="controls">
                                            <label class="textarea input-large">
                                            <textarea name="introduction">{$item['introduction']}</textarea>
                                            </label>
                                    </div>
                            </div>
		
		</div>
		<div id="tab5" class="tab-pane tab5">
                     <div class="form-item">
					<label class="item-label">公司logo<span class="check-tips"></span></label>
					<div class="controls">
						<input type="file" id="upload_picture_cover_id_04">
                                                <input type="hidden" name="company_logo" id="cover_id_cover_id_03" value="{$item['company_logo']}"/>
						<div class="upload-img-box"></div>
					</div>
					
					<script type="text/javascript">
					//上传图片
					/* 初始化上传插件 */
					$("#upload_picture_cover_id_04").uploadify({
						"height"          : 30,
						"swf"             : "{eval echo base_url()}static/uploadify/uploadify.swf",
						"fileObjName"     : "picture",
						"buttonText"      : "上传图片",
						"uploader"        : "http://static.tan66.com/upload/picture.html",//
						//'formData' : {"action": "upload", "sid" : ""},
						"width"           : 120,
						'removeTimeout'	  : 1,
						'fileTypeExts'	  : '*.jpg; *.png; *.gif;',
						"onUploadSuccess" : uploadPicturecover_id_04,
						'onFallback' : function() {
							alert('未检测到兼容版本的Flash.');
						}
					});
					function uploadPicturecover_id_04(file, data){
						var data = $.parseJSON(data);
						var src = '';
						if(data.status){
							$("#cover_id_cover_id_04").val(data.id);
							src = data.url || '' + data.path
							$("#cover_id_cover_id_04").parent().find('.upload-img-box').html(
								'<div class="upload-pre-item"><img src="' + src + '"/></div>'
							);
							
						} else {
							updateAlert(data.info);
							setTimeout(function(){
								$('#top-alert').find('button').click();
								//$(that).removeClass('disabled').prop('disabled',false);
							},1500);
						}
					}
					</script>
				</div>
                    <div class="form-item cf">
                            <label class="item-label">公司名称<span class="check-tips"></span></label>
                            <div class="controls">
                                <input type="text" class="text input-large" name="company_name" value="{$item['company_name']}">
                            </div>
                    </div>
                    <div class="form-item cf">
					<label class="item-label">公司网站<span class="check-tips"></span></label>
					<div class="controls">
                                            <input type="text" class="text input-large" name="website" value="{$item['website']}" placeholder="http://">
					</div>
				</div>
                    <div class="form-item cf">
                            <label class="item-label">公司地址<span class="check-tips"></span></label>
                            <div class="controls">
                                <input type="text" class="text input-large" name="company_address" value="{$item['company_address']}">
                            </div>
                    </div>
		</div>
                
		<div class="form-item cf">
                    <input type="hidden" name="id" value="{$item['id']}"/>
			<button class="btn submit-btn ajax-post" id="submit" type="submit" target-form="form-horizontal">确 定</button>
			<button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
		</div>
	</form>
	</div>
</div>
<!--F-->{load footer}
<script type="text/javascript">
showTab();
</script>